import axios from "./instance.js";
// 游客登录
const login = ()=>axios.get('/register/anonimous')
// 搜索建议
const searchSuggest = (inputdata)=>axios.get(`/search/suggest?keywords=${inputdata}`)
//默认搜索关键词
const defaultSearch = ()=>axios.get('/search/default')
//热搜列表
const hotSearch = ()=>axios.get("/search/hot/detail")
//搜索
const search = (obj)=>axios.get("/search",obj)

const banner= ()=>axios.get('/banner')
// 获取飙升榜歌单信息
const toplist=()=>axios.post('/playlist/detail',{id:19723756})
// 获取飙升榜歌单歌曲详情
const topMusic=()=>axios.post('/playlist/track/all',{id:19723756})
// 获取歌曲URL
const getSong=(obj)=>axios.get('/song/url/v1',obj)



//获取全部歌曲标签分类
const catList =()=>axios.get('/playlist/catlist')



//获取精品歌单标签
const hqlistTag = ()=>axios.get('/playlist/highquality/tags')

//获取精品歌单
const hqlist =(data)=>axios.get('/top/playlist/highquality',data)

//获取歌单详情
const listDetail = (data)=>axios.get('/playlist/detail',data)

//获取歌单所有详情
const musicList = (data) => axios.get('/playlist/track/all',data)

//MV推荐
const suggestMv = ()=>axios.get("/personalized/mv")
//MV最新
const newMv = (obj)=>axios.post("/mv/first",obj)
//MV地址，链接
const getMvUrl = (id)=>axios.get("/mv/url",id)
//获取某某地域MV
const getAreaMv = (obj)=>axios.get("/mv/all",obj)
//获取MV详细信息
const getMvDetail = (id)=>axios.get(`/mv/detail?mvid=${id}`)
//获取歌手信息
const artist = ()=>axios.get('/artist/list',{limit:50,type:-1});
// 获取歌手热歌
const artistSongs = (obj)=>axios.get("/artist/top/song",obj)


export default {
    login,
    banner,
    defaultSearch,
    searchSuggest,
    hotSearch,

    search,
    suggestMv,
    newMv,
    getMvUrl,
    getAreaMv,
    getMvDetail,


    catList,
    hqlist,
    listDetail,
    musicList,
    hqlistTag,

    toplist,
    topMusic,
    getSong,
    artist,
    artistSongs


}